#include <iostream>
#include <vector>
using namespace std;

int main()
{
	vector<int> v = { 1, 1, 0, 1, 1, 1 };
	vector<int> dp(v.size(), 0);
	dp[0] = v[0];
	for (int i = 1; i < v.size(); ++i)
	{
		if (v[i] == 1)
		{
			dp[i] = dp[i - 1] + 1;
		}
	}

	int _max = 0;
	for (int i = 0; i < v.size(); ++i)
	{
		_max = max(_max, dp[i]);
	}
	cout << _max << endl;
	return 0;
}